﻿<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>jquery打分评星级效果</title>

    <link media="screen" href="../css/htmlAll/grade.css" type="text/css" rel="stylesheet"/>

    <script src="../js/vendor/jquery-3.2.1.min.js" type="text/javascript"></script>
    <script src="../js/htmlAll/grade.js" type="text/javascript"></script>
    <script src="../js/public/public.js" type="text/javascript"></script>
    <script type="text/javascript">
        function but() {
            var user = localStorage.getItem(schoolLoginUserInfo);
            if (user == null) {
                toLogin();
            }
            var res = eval('(' + user + ')');
            var tId = window.location.search.substring(1);
            var note = document.getElementById("content").value;
            var score = document.getElementById("pointV1").value;
            var data = tId + "&commentatorId=" + res.id + "&content=" + note+"&score="+score;
            $.ajax({
                "url": url + scoreUrl,
                "type": 'post',
                "data": data,
                "dataType": "json",
                "success": function (data) {
                    var res = eval('(' + JSON.stringify(data) + ')');
                    if (res.resultCode != 200) {
                        error(data);
                        return;
                    }
                    alert("评价成功！");
                    window.close();
                }
            })
        }
    </script>

</head>
<body>


<div id="box">
    <h4>我的评分</h4>
    <div class="content">
        <!--<div id="myPoint">-->
        <!--<span><big>5</big><small>.0</small></span>-->
        <!--<div>-->
        <!--<img src="../img/score/star5.gif"/>-->
        <!--<em>(一般)</em>-->
        <!--</div>-->
        <!--</div>-->
        <div id="doPoint">
            <p>请点击以下星级进行评分/p>
            <table cellspacing="0" cellpadding="0" border="0">
                <tbody>
                <tr>
                    <th>综合评价：</th>
                    <td><span class="star5" id="item1" v="5"><small>1</small><small>2</small><small>3</small><small>4</small><small>5</small><small>6</small><small>7</small><small>8</small><small>9</small><small>10</small></span>
                    </td>
                    <td><strong>5</strong> <em>(一般)</em></td>
                </tr>
                <!--<tr>-->
                <!--<th>更新：</th>-->
                <!--<td><span class="star5" id="item2" v="5"><small>1</small><small>2</small><small>3</small><small>4</small><small>5</small><small>6</small><small>7</small><small>8</small><small>9</small><small>10</small></span>-->
                <!--</td>-->
                <!--<td><strong>5</strong> <em>(一般)</em></td>-->
                <!--</tr>-->
                <!--<tr>-->
                <!--<th>文笔：</th>-->
                <!--<td><span class="star5" id="item3" v="5"><small>1</small><small>2</small><small>3</small><small>4</small><small>5</small><small>6</small><small>7</small><small>8</small><small>9</small><small>10</small></span>-->
                <!--</td>-->
                <!--<td><strong>5</strong> <em>(一般)</em></td>-->
                <!--</tr>-->
                </tbody>
            </table>
        </div>
        <form id="form1" name="form1" action="" method="get">
            <input id="pointV1" type="hidden" value="5" name="pointV1"/>
            <input id="pointV2" type="hidden" value="5" name="pointV2"/>
            <input id="pointV3" type="hidden" value="5" name="pointV3"/>
            <label>评论内容：<textarea id="content" name="content" rows="5" cols="50"></textarea></label>
            <button type="button" id="sub" onclick="but()">提交</button>
        </form>
    </div>
</div>


</body>
</html>